package com.mooc;

import android.os.Bundle;
import android.widget.TextView;

import com.facebook.react.ReactActivity;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

public class MiPushActivity extends ReactActivity {

    public static List<String> logList = new CopyOnWriteArrayList<String>();

    private TextView mLogView = null;

//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_main);
//        MiPushApplication.setMainActivity(this);
//        mLogView = (TextView) findViewById(R.id.log);
//    }


    @Override
    protected void onResume() {
        super.onResume();
        refreshLogInfo();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        MainApplication.setMainActivity(null);
    }

    public void refreshLogInfo() {
        String AllLog = "";
        for (String log : logList) {
            AllLog = AllLog + log + "\n\n";
        }
        mLogView.setText(AllLog);
    }
}



